package levels
{
	import org.flixel.*;
	
	import states.GameState;
	import enemies.*;
	import interactions.*;
	import items.*;
	import treasures.*;
	import utilities.Wave;
	
	/**
	 * ...
	 * @author JAC
	 */
	public class Level_12 extends GameState
	{
		override public function create():void
		{
			super.create();
			
			_maze.load(MazeData.wave_intro);
			
			Player.spawnAt(14, 5);
			
			Tracker.lives = 3;
			Tracker.mapScore = 1000;
			Tracker.minScore = 4;
			
			addEntity(new Slow(25, 10));
			addEntity(new Slow(3, 10));
			addEntity(new SpeedBooster(9, 17));
			addEntity(new SpeedBooster(19, 17));
			addEntity(new RockThrow(15, 9));
			addEntity(new RockThrow(13, 9));
			addEntity(new Trapdoor(14, 15));
			
			var t1:Teleporter = new Teleporter(9, 5);
			var t2:Teleporter = new Teleporter(11, 5);
			t1.other = t2;
			t2.other = t1;
			addEntity(t1);
			addEntity(t2);
			
			t1 = new Teleporter(19, 5);
			t2 = new Teleporter(17, 5);
			t1.other = t2;
			t2.other = t1;
			addEntity(t1);
			addEntity(t2);
			
			addEntity(new LootBag(7, 7));
			addEntity(new LootBag(21, 7));
			addEntity(new LootBag(7, 13));
			addEntity(new LootBag(21, 13));

			addEntity(new LootBag(21, 3));
			addEntity(new LootBag(7, 3));
						
			var wave:Wave = new Wave();
			wave.addEntity(new Exorcist(1, 20));
			wave.addEntity(new Exorcist(27, 20));
			
			addWave(wave);

			wave = new Wave();
			wave.addEntity(new Robber(0, 6));
			wave.addEntity(new Robber(0, 14));
			wave.addEntity(new Robber(28, 6));
			wave.addEntity(new Robber(28, 14));
			addWave(wave);
			
			Tracker.maxWave = 2;
			
			gameStart();
		}
	}
}